package com.toprs.base.config

class RequestHolder {

    companion object {

        private val userIdHolder = ThreadLocal<String>()
        private val usernameHolder = ThreadLocal<String>()

        fun setUserId(userid: String) {
            userIdHolder.set(userid)
        }

        fun setUsername(username: String) {
            usernameHolder.set(username)
        }

        fun getUsername(): String? {
            return usernameHolder.get()
        }

        fun getUserId(): String {
            return userIdHolder.get()
        }

    }

}